def inverse(s, length):
    if length == 0:
        return
    else:
        print(s[length - 1])
        inverse(s, length - 1)


str = input("输入一串字符:")
inverse(str, len(str))
